<include file="__THEME__/admin_header" />
<div>
		<br><br><br>
		<h1>添加栏目相关内容</h1>
		<hr>
		<br><br><br>
		<form method="POST" action="{:U('admin/base/doContentAdd')}" id="frm_js">
		<tr>
			<td>标题:</td>
			<td><input name="name" type="text" size="20" id="js_name"></td>
		</tr>
		<br><br>
		<tr>
			<td>分类名称:</td>
			<td>{$type_name}</td>
		</tr>
		<br><br>
		<tr>
			<td>课程编码:</td>
			<td><input type="text" name="code" size="50" id="js_code"><input type="hidden" name="typeid" value="{$typeid}"></td>
		</tr>
		<br><br>
		<tr>
			<td>描述:</td>
			<td>
				<textarea cols="20" rows="10" type="text" name="desc" id="js_desc"></textarea>
			</td>
		</tr>
		<br><br>
		<tr>
			<td>备注:</td>
			<td>
				<textarea cols="20" rows="10" type="text" name="remark" id="js_remark"></textarea>
			</td>
		</tr>
		<br><br>
		<tr>
			<td><a href="javascript:viod(0);" onclick="addContent()">提交</a></td>
			<td><input type="reset" name="reset" value="重置"></td>
		</tr>
		</form>
</div>
<include file="__THEME__/admin_footer"/>
<script type="text/javascript"> 
	//获取子栏目
	function addContent(){
		var name  =  $("#js_name").val();
		var code  =  $("#js_name").val();
		var desc  =  $("#js_desc").val();
		var err   =  '';
		
		if(name == ''){
			err +="栏目名称不能为空;";
		}
		
		if(code==''){
			err+= "栏目编码不能为空;";
		}
		
		if(desc == ''){
			err +='栏目描述不能为空;';
		}
		
		if(err !=''){
			ui.error(err);
			return false;
		}else{
			$("#frm_js").submit();
		}
	}
	
	// 
	function image_upload(){
		alert("upload");
	}
</script>